<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Generating Powerline Traffic</title><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><meta name="keywords" content="Intellon, Atheros, Qualcomm, HomePlug, powerline, communications, INT6000, INT6300, INT6400, AR7400, AR7420"><link rel="home" href="index.html" title="Qualcomm Atheros Open Powerline Toolkit"><link rel="up" href="ch06.html" title="Chapter 6.  Scripting"><link rel="prev" href="ch06s09.html" title="Update a Device"><link rel="next" href="ch06s11.html" title="Reading PHY Rates"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">
			Generating Powerline Traffic
			</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch06s09.html">Prev</a> </td><th width="60%" align="center">Chapter 6. 
		Scripting
		</th><td width="20%" align="right"> <a accesskey="n" href="ch06s11.html">Next</a></td></tr></table><hr></div><div class="section" title="Generating Powerline Traffic"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="scripting-traffic"></a>
			Generating Powerline Traffic
			</h2></div></div></div><p>
			Once two devices associate, you must send data across the powerline in both direction so that each device can compute a TX and RX PHY rate. One method is to use the efsu program that comes with the Toolkit. The program is designed to send free-form Ethernet frames for test and debug purposes but we can also use it to send lots of junk frames in either direction.
			</p><pre class="programlisting">
FRAME=frame.hex
COUNT=1000
efsu -i ${NIC1} -hd ${MAC2} ${FRAME} -l ${COUNT}
efsu -i ${NIC2} -hd ${MAC1} ${FRAME} -l ${COUNT}
efsu -i ${NIC1} -hd ${MAC2} ${FRAME} -l ${COUNT}
efsu -i ${NIC2} -hd ${MAC1} ${FRAME} -l ${COUNT}
</pre><p>
			The example above uses <a class="ulink" href="efsu.7.html" target="_top">efsu</a> to send the generic Ethernet frame stored in file <code class="filename">frame.hex</code> between the two Ethernet interfaces <code class="varname">NIC1</code> and <code class="varname">NIC2</code> (<strong class="userinput"><code>-i</code></strong>). In this example, <code class="varname">NIC1</code> and <code class="varname">NIC2</code> are both installed in the host. We have <a class="ulink" href="efsu.7.html" target="_top">efsu</a> insert the host source address in the <acronym class="acronym">OSA</acronym> field (<strong class="userinput"><code>-h</code></strong>) and destination address in the <acronym class="acronym">ODA</acronym> field (<strong class="userinput"><code>-d</code></strong>) of each frame as it is sent. The entire operation sends the same frame <code class="constant">1000</code> times (<strong class="userinput"><code>-l</code></strong>) in each direction, twice.
			</p><p>
			Other methods of generating bi-directional traffic can be used but this method is simple, needs nothing other than the toolkit programs and permits easy synchronization. Program <a class="ulink" href="efsu.7.html" target="_top">efsu</a> is designed to send custom Etherenet frames, not measure or control data rates,  but the toolkit includes open source program <a class="ulink" href="ttcp.7.html" target="_top">ttcp</a> which is designed to measure and control data rates.
			</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch06s09.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch06.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ch06s11.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">
			Update a Device
			 </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 
			Reading PHY Rates
			</td></tr></table></div></body></html>
